﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CartFull.ascx.cs" Inherits="smartphone.UserControls.CartFull" %>

<div class="ShoppingCartFull">
    <p>
        <span class="headerTemplate">
            <asp:Label ID="titleLabel" runat="server" Text="Giỏ hàng của bạn" CssClass="CatalogTitle" />
        </span>
    </p>
    <p>
        <asp:Label ID="statusLabel" runat="server" ForeColor="#F84237" />
    </p> 

    <asp:GridView ID="GVFullCart" runat="server" AutoGenerateColumns="False" DataKeyNames="maSanPham" Width="100%" CssClass="CartFullTable" OnRowDeleting="GVFullCart_RowDeleting">
        <Columns>
            <asp:BoundField DataField="tenSanPham" HeaderText="Tên sản phẩm" ReadOnly="True" SortExpression="tenSanPham" />
            <asp:BoundField DataField="donGia" DataFormatString="{0:0,000}" HeaderText="Giá tiền" ReadOnly="True" SortExpression="donGia" />
            <asp:BoundField DataField="thuocTinh" HeaderText="Thuộc tính" ReadOnly="True" SortExpression="thuocTinh" />
            <asp:TemplateField HeaderText="Số lượng">
                <ItemTemplate>
                    <asp:TextBox ID="editQuantity" runat="server" CssClass="GridEditingRow"
                    Width="24px" MaxLength="2" Text='<%#Eval("soLuong")%>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="tongTienSanPham" DataFormatString="{0:0,000}" HeaderText="Tổng tiền" ReadOnly="True" SortExpression="donGia" />
            <asp:ButtonField CommandName="Delete" HeaderText="Xóa" ShowHeader="True" Text="Xóa" ButtonType="Button" />
        </Columns>
    </asp:GridView>

    <p align="right" style="margin-right: 20px; margin-top: 10px;">
        <span>Tổng tiền: </span>
        <asp:Label ID="totalAmountLabel" runat="server" Text="" />
    </p>

    <p align="right" >
        <asp:Button ID="updateButton" CssClass="CartLink CartUpdate" runat="server" Text="Cập nhật số lượng" OnClick="updateButton_Click" />
        <asp:Button ID="checkoutButton" CssClass="CartLink CartUpdate" runat="server" Text="Thanh toán" OnClick="checkoutButton_Click" />
    </p>
</div>
